#include <bits/stdc++.h>
using namespace std;
int n;
string s;
bool vis[30];
int main(void){
    freopen("arrange.in","r",stdin);
    freopen("arrange.out","w",stdout);
    scanf("%d",&n);
    char idx='A';
    int ans=0;
    for(int i=0;i<n;i++){
        cin >> s;
        vis[s[0]-'A']=true;   
    }
    for(int i=0;i<30;i++){
        if(!vis[i]){
            printf("%d\n",i);
            break;
        }
    }
    return 0;
}